	<div class="main">
		<div class="public-function">
			<fieldset>
				<legend>Tool Table 1</legend>
				<!-- Form Tạo Place Step 1 -->
				<fieldset>
					<legend>Chức năng tạo Place Step 1</legend>
					<form id="f_newPlace_s1"action="<?php echo URL ;?>index/newPlaceS1" method="post" accept-charset="utf-8">
						<table>
							<tbody>
								<tr>
									<td>PlaceName</td>
									<td>
										<input type="text" name="PlaceName" id="PlaceName" class="s_text f"/>
										<span class="wraning PlaceName"> * PlaceName phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>PlaceAddress</td>
									<td>
										<input type="text" name="PlaceAddress" id="PlaceAddress" class="s_text f"/>
										<span class="wraning PlaceAddress"> * PlaceAddress phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>CrossStreet</td>
									<td>
										<input type="text" name="CrossStreet" id="CrossStreet" class="s_text f"/>
										<span class="wraning CrossStreet"> * CrossStreet phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>City</td>
									<td>
										<input type="text" name="City" id="City" class="s_text f"/>
										<span class="wraning City"> * City phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>PostalCode</td>
									<td>
										<input type="text" name="PostalCode" id="PostalCode" class="s_text f"/>
										<span class="wraning PostalCode"> * PostalCode phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>PhoneNumber</td>
									<td>
										<input type="text" name="PhoneNumber" id="PhoneNumber" class="s_text f"/>
										<span class="wraning PhoneNumber"> * PhoneNumber phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Website</td>
									<td>
										<input type="text" name="Website" id="Website" class="s_text f"/>
										<span class="wraning Website"> * Website phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Facebook</td>
									<td>
										<input type="text" name="Facebook" id="Facebook" class="s_text f"/>
										<span class="wraning Facebook"> * Facebook phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Twitter</td>
									<td>
										<input type="text" name="Twitter" id="Twitter" class="s_text f"/>
										<span class="wraning Twitter"> * Twitter phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Description</td>
									<td>
										<input type="text" name="Description" id="Description" class="s_text f"/>
										<span class="wraning Description"> * Description phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
										<td></td>
										<td><input type="submit" name="button_click" id="submit_place" value="Submit"></input></td>
								</tr>
							</tbody>
						</table>
						<script type="text/javascript">
							$(document).ready(function() {
								$('#f_newPlace_s1').submit(function (){

									var url = $(this).attr('action');
								 	var pdata =  $(this).serializeObject();

									$('.f').css('border-color','rgba(0, 0, 0, 0.19)');
									$('.wraning').css('display','none');
									// Gui du lieu ve server xu ly
									$.post(url, pdata, function(o) {
									//data: Data from Server
										//console.log(o);
										var count = 0;
										$.each(o, function( index, value ) {
											count = index;
								  			$('#'+value).css('border-color','red');
								  			$('.'+value).css('display','block');
										});
									},'json').fail(function(jqXHR, textStatus, errorThrown){
									//fail
										console.log(errorThrown);

									});
									// Vi dung ajax nen phai tra ve false de form ko bi reload
									return false;
								});
							});
						</script><!-- end Script NewPlaceS1 submit-->
					</form><!-- End Form NewPlaceS1 -->
				</fieldset><!--End fielset Step 1-->

					<!-- Form Tạo Place Step 2-->
					<fieldset>
					<legend>Chức năng tạo Place Step 2</legend>
					<form id = "f_newPlace_s2"action="<?php echo URL ;?>index/newPlaceS2" method="post" accept-charset="utf-8">
						<table>
							<tbody>
								<tr>
									<td>Categories</td>
									<td>
										<input type="text" name="CategoriesName" id="CategoriesName" class="s_text f"/>
										<span class="wraning CategoriesName"> * CategoriesName phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Position</td>
									<td>
										<input type="text" name="Position" id="Position" class="s_text f"/>
										<span class="wraning Position"> * Position phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>WorkingDay</td>
									<td>
										<input type="text" name="WorkingDay" id="WorkingDay" class="s_text f"/>
										<span class="wraning WorkingDay"> * WorkingDay phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>WorkingTime</td>
									<td>
										<input type="text" name="WorkingTime" id="WorkingTime" class="s_text f"/>
										<span class="wraning WorkingTime"> * WorkingTime phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>ServiceName</td>
									<td>
										<input type="text" name="ServiceName" id="ServiceName" class="s_text f"/>
										<span class="wraning ServiceName"> * ServiceName phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Status</td>
									<td>
										<input type="text" name="Status" id="Status" class="s_text f"/>
										<span class="wraning Status"> * Status phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Menu</td>
									<td>
										<input type="text" name="Menu" id="Menu" class="s_text f"/>
										<span class="wraning Menu"> * Menu phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
										<td></td>
										<td><input type="submit" name="button_click" id="submit_place" value="Submit"></input></td>
								</tr>
						</table>
						<script type="text/javascript">
							$(document).ready(function() {
								$('#f_newPlace_s2').submit(function (){

									var url = $(this).attr('action');
								 	var pdata =  $(this).serializeObject();

									$('.f').css('border-color','rgba(0, 0, 0, 0.19)');
									$('.wraning').css('display','none');
									// Gui du lieu ve server xu ly
									$.post(url, pdata, function(o) {
									//data: Data from Server
										//console.log(o);
										var count = 0;
										$.each(o, function( index, value ) {
											count = index;
								  			$('#'+value).css('border-color','red');
								  			$('.'+value).css('display','block');
										});
									},'json').fail(function(jqXHR, textStatus, errorThrown){
									//fail
										console.log(errorThrown);

									});
									// Vi dung ajax nen phai tra ve false de form ko bi reload
									return false;
								});
							});
						</script><!--// end Script NewPlaceS2 submit -->
					</form> <!-- End form NewPlace Step2 -->
					</fieldset><!--End fieldset Step 2-->

					<!-- Form Upload Image-->
					<fieldset>
						<legend>Upload Image</legend>

					<form id = "f_uploadIMG"action="<?php echo URL ;?>index/uploadIMG"method="post" enctype="multipart/form-data">
						<label for="file">Filename:</label>
						<input type="file" name="file" id="file"><br>
						<input type="submit" name="submit" value="Submit">
					</form><!-- End Form Upload Image-->
					</fieldset><!-- End fieldset Upload Image-->

					<!-- Form Display IMG -->
					<fieldset>
						<legend>Hiển thị IMG</legend>

						</form><!--End Form Display IMG -->
					</fieldset><!-- End Fieldset Form Display IMG-->
			</fieldset><!-- end fieldset Tool Table 1-->
		</div><!-- end PUBLIC-FUNCTION Tool Table 1-->
		<div class="tool">
			<fieldset>
				<legend>Tool Table 2</legend>
				<fieldset>
					<legend>Chức năng tạo tài khoản </legend>
					<form id="f_sign_up" action="<?php echo URL ;?>index/singup" method="post" accept-charset="utf-8">
						<table>
							<tbody>
								<tr>
									<td>FirstName</td>
									<td>
										<input type="text" name="FirstName" id="FirstName" class="s_text f"/>
										<span class="wraning FirstName"> * FirstName phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>LastName</td>
									<td>
										<input type="text" name="LastName" id="LastName" class="s_text f"/>
										<span class="wraning LastName"> * LastName phải có ít nhất 2 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Email</td>
									<td>
										<input type="text" name="Email" id="Email" class="s_text f"/>
										<span class="wraning Email"> * Email không đúng định dạng</span>
									</td>
								</tr>
								<tr>
									<td>Re_Email</td>
									<td>
										<input type="text" name="Re_Email" id="Re_Email" class="s_text f"/>
										<span class="wraning Re_Email"> * Re_Email phải giống email</span>
									</td>
								</tr>
								<tr>
									<td>Password</td>
									<td>
										<input type="password" name="Password" id="Password" class="s_text f"/>
										<span class="wraning Password"> * password phải có ít nhất 6 ký tự trở lên</span>
									</td>
								</tr>
								<tr>
									<td>Sex</td>
									<td>
										<select name="Gender">
											<option value="0">Gentlemen</option>
											<option value="1">Lady</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>Birthday</td>
									<td>
										<select id="days" name="day"></select>
										<select id="months" name="month"></select>
										<select id="years" name="year"></select>
										<span class="wraning Birthday"> * Ngày bạn chọn không tồn tại</span>
										<script type="text/javascript">
											for (i = new Date().getFullYear() - 5; i > 1930; i--)
											{
											    $('#years').append($('<option />').val(i).html(i));
											}

											for (i = 1; i < 13; i++)
											{
												var m = i ;
												if(i < 10){ m= '0'+i; }

											    $('#months').append($('<option />').val(m).html(m));
											}

											for(i=1; i < 32 ; i++)
											{
										    	var m = i ;
												if(i < 10){ m= '0'+i; }
										        $('#days').append($('<option />').val(m).html(m));
										    }

											$(document).ready(function() {
												$('#f_sign_up').submit(function (){
													var url = $(this).attr('action');
												 	var pdata =  $(this).serializeObject();
												 	$('.f').css('border-color','rgba(0, 0, 0, 0.19)');
												 	$('.wraning').css('display','none');
													// Gui du lieu ve server xu ly
													$.post(url, pdata, function(o) {
														//data: Data from Server
														var count = 0;
														$.each(o, function( index, value ) {
															count = index;
												  			$('#'+value).css('border-color','red');
												  			$('.'+value).css('display','block');
														});
														console.log(count);
														if(count == 0 ) window.location.reload();

													},'json').fail(function(jqXHR, textStatus, errorThrown){
														//fail
														console.log(errorThrown);

													});
													// Vi dung ajax nen phai tra ve false de form ko bi reload
													return false;
												});// end form sign up submit

											});

										</script>
									</td>
								</tr>
								<tr>
									<td></td>
									<td><input type="submit" id="button_click" name="submit" value="sign up" /></td>
								</tr>
							</tbody>
						</table>
					</form>
				</fieldset><!-- end fieldset tao tai khoan-->
				<fieldset>
					<legend>chức năng login</legend>
					<?php Session::init(); if(session::get('loggerIn') == true): ?>
						<div class="btn default_bnt">
							Welcome to Hellllll :D
							<a href="<?php echo URL ;?>login/logout">  log out</a>
						</div>
					<?php else :?>
						<div class="login-form">
							<form id="form_login" action="<?php echo URL ;?>index" id="form_login" method="post" accept-charset="utf-8">
								<p class="error" ></p>
								<table>
									<tbody>
										<tr>
											<td>User name</td>
											<td><input type="text" name="user_name" id="user_name" /></td>
										</tr>
										<tr>
											<td>Password</td>
											<td><input type="password" name="password" id="password" /></td>
										</tr>
										<tr>
											<td><input type="checkbox" name="remember" value="remember">Remember me</td>
											<td></td>
										</tr>
										<tr>
											<td></td>
											<td><input type="submit" name="submit" id="submit_login" value="Login"></input></td>
										</tr>
									</tbody>
								</table>
							</form>
							<script type="text/javascript">
								$(document).ready(function() {

									$('#form_login').submit(function(e) {
										// Lay du lieu tren from
										var url = $(this).attr('action') + '/login';
									 	var pdata =  $(this).serializeObject();

										// Gui du lieu ve server xu ly
										$('.loadding').css('display','block');
										$.post(url, pdata, function(o) {
											//data: Data from Server
											$('.loadding').css('display','none');
											if(o.success != true)
											{
												$('.error').html('Ten dang nhap hoac mat khau khong dung </br></br>');
									     		$('#form_login input[type=text],#form_login input[type=password]').css('border-color','red');
											}else {
												location.reload();
											}
										},'json').fail(function(jqXHR, textStatus, errorThrown){
											//fail
											$('.loadding').css('display','none');
									     	$('.error').html('Ten dang nhap hoac mat khau khong dung </br></br>');
									     	$('#form_login input[type=text],#form_login input[type=password]').css('border-color','red');
										});
										// Vi dung ajax nen phai tra ve false de form ko bi reload
										return false;
									});// End event submit login
								});
							</script>
						</div>
					<?php endif;?>
				</fieldset><!-- end fieldset login-->
			</fieldset><!-- end fieldset Tool Table 2-->
			<fieldset>
				<legend>map Google tổng (Home Page)</legend>
				<div id="m_homePage" class="map full"></div>
			</fieldset>
		</div><!-- end tool-->
	</div> <!-- end public-function tool table 2 -->

